Skip to content

test: end-to-end migrator suite + bump kura to v2.0.2#7

Merged
Taure merged 1 commit into
mainfrom
test/migrator-end-to-end
May 10, 2026
Merged

test: end-to-end migrator suite + bump kura to v2.0.2#7
Taure merged 1 commit into
mainfrom
test/migrator-end-to-end

Conversation

@Taure
Copy link
Copy Markdown
Owner

@Taure Taure commented May 10, 2026

Summary

Adds kura_sqlite_migrator_SUITE — full migrate → verify table → verify schema_migrations row → rollback path against an in-memory SQLite DB. Closes the SQLite-side gap where unit tests covered DDL emission but no test exercised the kura_migrator runtime end-to-end.

Bumps kura pin to v2.0.2 so this suite picks up the two fixes it surfaced:

  1. ensure_schema_migrations emitted Postgres-only DDL (TIMESTAMPTZ, DEFAULT now()). Fixed in kura #116 → v2.0.1.
  2. Dialect dispatch used erlang:function_exported/3 without code:ensure_loaded/1, so SQLite's column_type / format_default callbacks were silently invisible — the migrator fell back to PG defaults (BIGSERIAL, etc.). Fixed in kura #117 → v2.0.2.

Without these fixes, no v2.0.0 / v2.0.1 user could actually run migrations against SQLite.

Test plan

  • rebar3 fmt --check
  • rebar3 xref
  • ~/bin/elp eqwalize-all
  • rebar3 ct --suite test/kura_sqlite_migrator_SUITE — 3/3
  • rebar3 eunit — 39/39 (existing smoke tests still pass)

Adds kura_sqlite_migrator_SUITE: full migrate -> verify table ->
verify schema_migrations row -> rollback path against an in-memory
SQLite DB. Closes the SQLite-side gap where unit tests covered DDL
emission but no test exercised the kura_migrator runtime end-to-end.

This suite caught two real kura bugs that v2.0.0 / v2.0.1 users
would have hit on first migrate:

- ensure_schema_migrations emitted Postgres-only DDL
  (TIMESTAMPTZ, DEFAULT now()). Fixed in kura #116 -> v2.0.1.
- Dialect dispatch used erlang:function_exported/3 without
  code:ensure_loaded/1, so SQLite's column_type/format_default
  callbacks were silently invisible and the migrator fell back
  to the PG defaults (BIGSERIAL, etc). Fixed in kura #117 -> v2.0.2.

Bumps the kura pin to v2.0.2 so this suite picks up both fixes.
@github-actions
Copy link
Copy Markdown

🟠 Code Coverage — 58.9%

103 of 175 lines covered.


🟡 ELP Lint — 1 warning

2 diagnostics found. See job logs for details.


ℹ️ 11 OTP CVEs auto-ignored (already fixed in running version)

These CVEs are patched in the installed OTP version but NVD data
has not been updated to reflect this. They are excluded from the
scan via an auto-generated .trivyignore.

CVE Details
CVE-2026-23943 Fixed in 28.4.1, running 28.4.1 — Pre-auth SSH DoS via unbounded zlib inflate
CVE-2026-23942 Fixed in 28.4.1, running 28.4.1 — SFTP root escape via component-agnostic prefix check in ssh_sftpd
CVE-2026-23941 Fixed in 28.4.1, running 28.4.1 — Request smuggling via first-wins Content-Length parsing in inets httpd
CVE-2026-21620 Fixed in 28.3.2, running 28.4.1 — TFTP Path Traversal
CVE-2016-1000107 Fixed in 28.0.4, running 28.4.1 — Httpd CGI Scripts Environment Variable Pollution AKA "httpoxy"
CVE-2025-58050 Fixed in 28.0.3, running 28.4.1 — Buffer Read Overflow on Regular Expressions with (*scs:) and (*ACCEPT)
CVE-2025-48038 Fixed in 28.0.3, running 28.4.1 — SSH Unverified File Handles can Cause Excessive Use of System Resources
CVE-2025-48039 Fixed in 28.0.3, running 28.4.1 — SSH Unverified Paths can Cause Excessive Use of System Resources
CVE-2025-48040 Fixed in 28.0.3, running 28.4.1 — SSH Malicious Key Exchange Messages may Lead to Excessive Resource Consumption
CVE-2025-48041 Fixed in 28.0.3, running 28.4.1 — SSH_FXP_OPENDIR may Lead to Exhaustion of File Handles
CVE-2025-4748 Fixed in 28.0.1, running 28.4.1 — Absolute Path in Zip Module

@Taure Taure merged commit 8794e96 into main May 10, 2026
15 of 16 checks passed
@Taure Taure deleted the test/migrator-end-to-end branch May 10, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant